<%@ page language="java" contentType="text/html" pageEncoding="utf-8" import="java.util.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="name" class="com.user"></jsp:useBean>
<%
	out.print("用户名："+name.getName());
%><br>
<jsp:setProperty property="name" name="name" value="anne"/>
用户名：<jsp:getProperty property="name" name="name"/>
</body>
</html>